.class Landroid/support/v4/widget/ScrollerCompat$Chaser;
.super Ljava/lang/Object;


# instance fields
.field private mLastTime:J

.field private mTargetX:I

.field private mTargetY:I

.field private mTranslateSmoothing:F

.field private mX:I

.field private mY:I


# direct methods
.method constructor <init>()V
    .locals 1

    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    const/high16 v0, 0x40000000    # 2.0f

    iput v0, p0, Landroid/support/v4/widget/ScrollerCompat$Chaser;->mTranslateSmoothing:F

    return-void
.end method


# virtual methods
.method public abort()V
    .locals 2

    iget v0, p0, Landroid/support/v4/widget/ScrollerCompat$Chaser;->mTargetX:I

    iput v0, p0, Landroid/support/v4/widget/ScrollerCompat$Chaser;->mX:I

    iget v0, p0, Landroid/support/v4/widget/ScrollerCompat$Chaser;->mTargetY:I

    iput v0, p0, Landroid/support/v4/widget/ScrollerCompat$Chaser;->mY:I

    invoke-static {}, Landroid/view/animation/AnimationUtils;->currentAnimationTimeMillis()J

    move-result-wide v0

    iput-wide v0, p0, Landroid/support/v4/widget/ScrollerCompat$Chaser;->mLastTime:J

    return-void
.end method

.method public computeScrollOffset()Z
    .locals 8

    const/4 v0, 0x0

    invoke-virtual {p0}, Landroid/support/v4/widget/ScrollerCompat$Chaser;->isSmoothingEnabled()Z

    move-result v1

    if-eqz v1, :cond_4

    invoke-virtual {p0}, Landroid/support/v4/widget/ScrollerCompat$Chaser;->isFinished()Z

    move-result v1

    if-nez v1, :cond_4

    invoke-static {}, Landroid/view/animation/AnimationUtils;->currentAnimationTimeMillis()J

    move-result-wide v2

    iget-wide v4, p0, Landroid/support/v4/widget/ScrollerCompat$Chaser;->mLastTime:J

    sub-long v4, v2, v4

    long-to-float v1, v4

    const/high16 v4, 0x41800000    # 16.0f

    div-float/2addr v1, v4

    const/4 v4, 0x0

    cmpl-float v4, v1, v4

    if-lez v4, :cond_3

    :goto_0
    int-to-float v4, v0

    cmpg-float v4, v4, v1

    if-gez v4, :cond_2

    iget v4, p0, Landroid/support/v4/widget/ScrollerCompat$Chaser;->mTargetX:I

    iget v5, p0, Landroid/support/v4/widget/ScrollerCompat$Chaser;->mX:I

    sub-int/2addr v4, v5

    iget v5, p0, Landroid/support/v4/widget/ScrollerCompat$Chaser;->mTargetY:I

    iget v6, p0, Landroid/support/v4/widget/ScrollerCompat$Chaser;->mY:I

    sub-int/2addr v5, v6

    int-to-float v4, v4

    iget v6, p0, Landroid/support/v4/widget/ScrollerCompat$Chaser;->mTranslateSmoothing:F

    div-float/2addr v4, v6

    float-to-int v4, v4

    int-to-float v5, v5

    iget v6, p0, Landroid/support/v4/widget/ScrollerCompat$Chaser;->mTranslateSmoothing:F

    div-float/2addr v5, v6

    float-to-int v5, v5

    iget v6, p0, Landroid/support/v4/widget/ScrollerCompat$Chaser;->mX:I

    add-int/2addr v6, v4

    iput v6, p0, Landroid/support/v4/widget/ScrollerCompat$Chaser;->mX:I

    iget v6, p0, Landroid/support/v4/widget/ScrollerCompat$Chaser;->mY:I

    add-int/2addr v6, v5

    iput v6, p0, Landroid/support/v4/widget/ScrollerCompat$Chaser;->mY:I

    iget v6, p0, Landroid/support/v4/widget/ScrollerCompat$Chaser;->mX:I

    iget v7, p0, Landroid/support/v4/widget/ScrollerCompat$Chaser;->mTargetX:I

    if-eq v6, v7, :cond_0

    if-nez v4, :cond_0

    iget v4, p0, Landroid/support/v4/widget/ScrollerCompat$Chaser;->mTargetX:I

    iput v4, p0, Landroid/support/v4/widget/ScrollerCompat$Chaser;->mX:I

    :cond_0
    iget v4, p0, Landroid/support/v4/widget/ScrollerCompat$Chaser;->mY:I

    iget v6, p0, Landroid/support/v4/widget/ScrollerCompat$Chaser;->mTargetY:I

    if-eq v4, v6, :cond_1

    if-nez v5, :cond_1

    iget v4, p0, Landroid/support/v4/widget/ScrollerCompat$Chaser;->mTargetY:I

    iput v4, p0, Landroid/support/v4/widget/ScrollerCompat$Chaser;->mY:I

    :cond_1
    add-int/lit8 v0, v0, 0x1

    goto :goto_0

    :cond_2
    iput-wide v2, p0, Landroid/support/v4/widget/ScrollerCompat$Chaser;->mLastTime:J

    :cond_3
    const/4 v0, 0x1

    :cond_4
    return v0
.end method

.method public getCurrX()I
    .locals 1

    iget v0, p0, Landroid/support/v4/widget/ScrollerCompat$Chaser;->mX:I

    return v0
.end method

.method public getCurrY()I
    .locals 1

    iget v0, p0, Landroid/support/v4/widget/ScrollerCompat$Chaser;->mY:I

    return v0
.end method

.method public getFinalX()I
    .locals 1

    iget v0, p0, Landroid/support/v4/widget/ScrollerCompat$Chaser;->mTargetX:I

    return v0
.end method

.method public getFinalY()I
    .locals 1

    iget v0, p0, Landroid/support/v4/widget/ScrollerCompat$Chaser;->mTargetY:I

    return v0
.end method

.method public isFinished()Z
    .locals 2

    iget v0, p0, Landroid/support/v4/widget/ScrollerCompat$Chaser;->mX:I

    iget v1, p0, Landroid/support/v4/widget/ScrollerCompat$Chaser;->mTargetX:I

    if-ne v0, v1, :cond_0

    iget v0, p0, Landroid/support/v4/widget/ScrollerCompat$Chaser;->mY:I

    iget v1, p0, Landroid/support/v4/widget/ScrollerCompat$Chaser;->mTargetY:I

    if-ne v0, v1, :cond_0

    const/4 v0, 0x1

    :goto_0
    return v0

    :cond_0
    const/4 v0, 0x0

    goto :goto_0
.end method

.method public isSmoothingEnabled()Z
    .locals 2

    iget v0, p0, Landroid/support/v4/widget/ScrollerCompat$Chaser;->mTranslateSmoothing:F

    const/4 v1, 0x0

    cmpl-float v0, v0, v1

    if-lez v0, :cond_0

    const/4 v0, 0x1

    :goto_0
    return v0

    :cond_0
    const/4 v0, 0x0

    goto :goto_0
.end method

.method public setCurrentPosition(II)V
    .locals 0

    iput p1, p0, Landroid/support/v4/widget/ScrollerCompat$Chaser;->mX:I

    iput p2, p0, Landroid/support/v4/widget/ScrollerCompat$Chaser;->mY:I

    return-void
.end method

.method public setSmoothing(F)V
    .locals 2

    const/4 v0, 0x0

    cmpg-float v0, p1, v0

    if-gez v0, :cond_0

    new-instance v0, Ljava/lang/IllegalArgumentException;

    const-string/jumbo v1, "smoothing value must be positive"

    invoke-direct {v0, v1}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V

    throw v0

    :cond_0
    iput p1, p0, Landroid/support/v4/widget/ScrollerCompat$Chaser;->mTranslateSmoothing:F

    return-void
.end method

.method public setTarget(II)V
    .locals 0

    iput p1, p0, Landroid/support/v4/widget/ScrollerCompat$Chaser;->mTargetX:I

    iput p2, p0, Landroid/support/v4/widget/ScrollerCompat$Chaser;->mTargetY:I

    return-void
.end method

.method public toString()Ljava/lang/String;
    .locals 4

    new-instance v0, Ljava/lang/StringBuilder;

    invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V

    const-string/jumbo v1, "{x="

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    iget v1, p0, Landroid/support/v4/widget/ScrollerCompat$Chaser;->mX:I

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    move-result-object v0

    const-string/jumbo v1, " y="

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    iget v1, p0, Landroid/support/v4/widget/ScrollerCompat$Chaser;->mY:I

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    move-result-object v0

    const-string/jumbo v1, " targetX="

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    iget v1, p0, Landroid/support/v4/widget/ScrollerCompat$Chaser;->mTargetX:I

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    move-result-object v0

    const-string/jumbo v1, " targetY="

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    iget v1, p0, Landroid/support/v4/widget/ScrollerCompat$Chaser;->mTargetY:I

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    move-result-object v0

    const-string/jumbo v1, " smoothing="

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    iget v1, p0, Landroid/support/v4/widget/ScrollerCompat$Chaser;->mTranslateSmoothing:F

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(F)Ljava/lang/StringBuilder;

    move-result-object v0

    const-string/jumbo v1, " lastTime="

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    iget-wide v2, p0, Landroid/support/v4/widget/ScrollerCompat$Chaser;->mLastTime:J

    invoke-virtual {v0, v2, v3}, Ljava/lang/StringBuilder;->append(J)Ljava/lang/StringBuilder;

    move-result-object v0

    const-string/jumbo v1, "}"

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    return-object v0
.end method
